package command.CeilingFan;

/**
 * Created by lenovo on 2018/1/3.
 */
public class CeilingFan {
    String desc=null;
    public static final int HIGH=3;
    public static final int MEDIUM=2;
    public static final int LOW=1;
    public static final int OFF=0;
    String location;
    int speed;

    public CeilingFan(String desc) {
        this.desc = desc;
    }

    public CeilingFan(String desc, String location, int speed) {
        this.desc = desc;
        this.location = location;
        this.speed = speed;
    }

    public void on(){
        System.out.println("ceilingFan on ...");
    }
    public void off(){
        System.out.println("ceilingFan off ...");
    }
    public void hight(){
        speed=HIGH;
        System.out.println("speed is ..."+speed);
    }
    public void medium(){
        speed=MEDIUM;
        System.out.println("speed is ..."+speed);
    }
    public void low(){
        speed=LOW;
        System.out.println("speed is ..."+speed);
    }
    public void down(){
        speed=OFF;
        System.out.println("speed is ..."+speed);
    }

    public int getSpeed() {
        return speed;
    }
}
